// pages/personalCenter/personalCenter.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    orderTitle: ['全部订单','待付款','待发货','待收货','待评论'],
    orderIcon: ['../../images/userCenter/allOrder.png', '../../images/userCenter/noPay.png', '../../images/userCenter/noSend.png', '../../images/userCenter/noGet.png', '../../images/userCenter/evaluation.png', ],
    state:['0','1','3','4','5'],
    routers:[
      {
        name: '售后订单',
        icon: '../../images/userCenter/feedBack.png',
        code: '11',
        url: '../../pages/afterSale/afterSale',
      }, {
        name: '我的优惠券',
        icon: '../../images/userCenter/coupon.png',
        code: '11',
        url: '../../pages/coupon/coupon',
      }, {
        name: '我的消息',
        icon: '../../images/userCenter/message.png',
        code: '11',
        url: '../../pages/myMessage/myMessage',
      }, {
        name: '店铺收藏',
        icon: '../../images/userCenter/collection.png',
        code: '11',
        url: '../../pages/collection/myCollection',
      }, {
        name: '主播关注',
        icon: '../../images/userCenter/focusOn.png',
        code: '11',
        url: '../../pages/focusOn/focusOn',
      }, {
        name: '联系客服',
        icon: '../../images/userCenter/customerService.png',
        code: '11',
        url: '../../pages/mypage/mypage',
      }, {
        name: '我的主播',
        icon: '../../images/userCenter/host.png',
        code: '11',
        url: '../../pages/myHost/myHost',
      }, {
        name: '我的商户',
        icon: '../../images/userCenter/merchants.png',
        code: '11',
        url: '../../pages/myStore/myStore',
      },
    ],
  },
  /**
   * 点击收货地址
   */
  addressClick:function(){
    wx.navigateTo({
      url: '../personalCenter/personAddress/addressList/addressList',
    })
  },
  /***
   * 我的订单
  */
  goMyorder: function (e) {
    var that = this;
    var state = e.currentTarget.dataset.state;
    this.goPage("../order/myOrder/myOrder?state=" + state)
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },
  /**
 * 跳转页面
 */
  goPage: function (url) {
    wx.showLoading({
      title: '跳转中',
      icon: 'loading',
      mask: true
    })
    wx.navigateTo({
      url: url,
      success: function () {
        wx.hideLoading();
      }
    })
  },
})